package org.theSeed.redisIntegration.pojo.prop;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.theSeed.redisIntegration.config.RedissonKey;
import org.theSeed.redisIntegration.pojo.constant.CacheConstant;

import javax.annotation.PostConstruct;

@Getter
@Setter
@Configuration
@ConfigurationProperties("redis-prop")
public class RedisProp {
    @PostConstruct
    public void init(){
        RedissonKey.setRedisKeyPreix(keyPrefix);
    }

    /**
     * redis前缀
     */
    private String keyPrefix = "SEED:";

    private String managerKeyPrefix = CacheConstant.MANAGER_KEY_PREFIX;

    /**
     * manager缓存秒数
     */
    private Integer cacheManagerSecond = 60 * 10;
}
